/***************************************************************************
 *   Copyleft 2008-2009 by												   *
 *	 Iwanicki Krzysztof													   *
 *   <gamma.mini.pw.edu.pl/~iwanickik>									   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 ***************************************************************************/
#include "./vMaterial.h"


namespace Vendetta {
	vMaterial::vMaterial() {
		mName = "Uknown";
	}

	vMaterial::vMaterial(const vString& name)/*: this()*/ {
		mName = name;
	}

	vMaterial::vMaterial(const vMaterial& mat) {
	}

	vMaterial::~vMaterial() {
		vUInt uiPos = 0;
		vPass* pUnit;
		while (mPasses.Size() > 0) {
			pUnit = mPasses[0];
			if (pUnit) {
				delete pUnit;
			}
			mPasses.RemoveFirst();
		}
	}

	vMaterial vMaterial::operator=(const vMaterial& mat) {
		return *this;
	}

	vVoid vMaterial::Apply() {
	}

	vVoid vMaterial::addPass(vPass* pass) {
		if (pass) {
			mPasses<<pass;
		}
	}

	vPass* vMaterial::createPass() {
		vPass *pPass = new vPass;

		return pPass;
	}
}